package com.hldsmart.smartda.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

import com.hldsmart.smartda.R;
import com.hldsmart.smartda.base.BaseActivity;

import java.util.Timer;
import java.util.TimerTask;

/**
 * Created by lzh194 on 2017/1/16.
 * 启动页
 */

public class SplashActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        //设置无标题
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);//全屏没有状态栏
        setContentView(R.layout.activity_splash);
        Timer timer = new Timer();
        //2.5秒后自动调转到主页面
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                startActivity(new Intent(SplashActivity.this, MainActivity.class));
                finish();
            }
        }, 2500);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();

    }


}


